package com.wen.edu.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author：Win
 * @Date: 2021/6/20 17:27
 * @Description: 调用service-order模块中的方法
 */
@FeignClient("service-order")
@Component
public interface OrderApi {
    /**
     * 根据课程id和用户id查询当前课程是否被购买
     *
     * @param memberId 用户id
     * @param courseId 课程id
     * @return true(已经被当用户购买) or false(当前用户未购买)
     */
    @GetMapping("/edu/order/service/isBuyCourse/{memberId}/{courseId}")
    boolean isBuyCourse(@PathVariable("memberId") String memberId, @PathVariable("courseId") String courseId);
}
